package thread;

//饿汉模式
//一旦创建就立刻实例化对象
public class Singleton {
    private Singleton instance = new Singleton();

    private Singleton() {}

    public Singleton getInstance() {
        return instance;
    }
}